<!--- ==================================================
NAME:		input_update_billing_address.cfm
DESC:		The XML for XTI needed to update the billing
			address. This is called from
			act_multi_billing_address.cfm by way of
			xti_handler.cfm.
=================================================== --->

<cfparam name="attributes.customer_id" type="any" default="">
<cfparam name="attributes.iaddress1" type="any" default="">
<cfparam name="attributes.iaddress2" type="any" default="">
<cfparam name="attributes.iaddress3" type="any" default="">
<cfparam name="attributes.icity" type="any" default="">
<cfparam name="attributes.istate_province" type="any" default="">
<cfparam name="attributes.ipostal_code" type="any" default="">
<cfparam name="attributes.geo_code" type="any" default="">
<cfparam name="attributes.icountry" type="any" default="">
<cfparam name="attributes.company_name" type="any" default="">
<cfparam name="attributes.customer_type" type="any" default="">
<!--- added loc_id for P02566 --->
<cfparam name="attributes.loc_id" type="any" default="">
<cfparam name="attributes.iphone" type="any" default="">
<cfparam name="attributes.last_name" type="any" default="">
<cfparam name="attributes.first_name" type="any" default="">
<cfparam name="attributes.iemail" type="any" default="">

<cfscript>
xml = 
'<!DOCTYPE copy SYSTEM "#attributes.dtd#">
<xtiinput>
   <inputheader>
      <actionset>
         <action>upd_cust</action>
      </actionset>
   </inputheader>
   <inputdata>
   <customer>
      <customerid>#ucase(attributes.customer_id)#</customerid>
	  <customer_type>#ucase(attributes.customer_type)#</customer_type>
	  <company_name>#ucase(replacenocase(replace(attributes.company_name , '&', 'AND' , 'ALL'), 'amp;', '', 'ALL'))#</company_name>
      <last_name>#ucase(attributes.last_name)#</last_name>
	  <first_name>#ucase(attributes.first_name)#</first_name>
	  <email>#ucase(attributes.iemail)#</email>
	  <billing>
         <address_1>#ucase(rereplace(attributes.iaddress1,"&","AND","ALL"))#</address_1>
         <address_2>#ucase(rereplace(attributes.iaddress2,"&","AND","ALL"))#</address_2>
         <city>#ucase(rereplace(attributes.icity,"&","AND","ALL"))#</city>
         <state>#ucase(rereplace(attributes.istate_province,"&","AND","ALL"))#</state>
         <zip>#ucase(attributes.ipostal_code)#</zip>
		 <zip>#ucase(attributes.geo_code)#</zip>
         <country>#ucase(attributes.icountry)#</country>
		 <phone>#ucase(attributes.iphone)#</phone>
      </billing>
	  <loc_id>#ucase(attributes.loc_id)#</loc_id>	  
   </customer>
   </inputdata>
</xtiinput>';
</cfscript>